﻿using System;
using System.Security.Permissions;
using System.Runtime.InteropServices;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;
using VSeWSS;

namespace de.rwth.rz.campus.sharepointutils.GMEventRecevier
{
    [CLSCompliant(false)]
    //[TargetList("00bfea71-de22-43b2-a848-c05709900100")]
    [Guid("e2165574-d023-4093-8225-d83419c6c75b")]
    public class GMEventReceiverListEventReceiver : SPListEventReceiver
    {
        /// <summary>
        /// Initializes a new instance of the Microsoft.SharePoint.SPListEventReceiver class.
        /// </summary>
        public GMEventReceiverListEventReceiver()
        {
        }

        /// <summary>
        /// Occurs after a field link is added.
        /// </summary>
        /// <param name="properties">
        /// A Microsoft.SharePoint.SPListEventProperties object that represents properties of the event handler.
        /// </param>
        //public override void FieldAdded(SPListEventProperties properties)
        //{
        //}

        /// <summary>
        /// Occurs when a fieldlink is being added to a content type.
        /// </summary>
        /// <param name="properties">
        /// A Microsoft.SharePoint.SPListEventProperties object that represents properties of the event handler.
        /// </param>
        //public override void FieldAdding(SPListEventProperties properties)
        //{
        //}

        /// <summary>
        /// Occurs after a field has been removed from the list.
        /// </summary>
        /// <param name="properties">
        /// A Microsoft.SharePoint.SPListEventProperties object that represents properties of the event handler.
        /// </param>
        //public override void FieldDeleted(SPListEventProperties properties)
        //{
        //}

        /// <summary>
        /// Occurs when a field is in process of being removed from the list.
        /// </summary>
        /// <param name="properties">
        /// A Microsoft.SharePoint.SPListEventProperties object that represents properties of the event handler.
        /// </param>
        //public override void FieldDeleting(SPListEventProperties properties)
        //{
        //    properties.ErrorMessage = "EY";
        //    properties.Status = SPEventReceiverStatus.CancelWithError;
        //    properties.Cancel = true;
        //}

        /// <summary>
        /// Occurs after a field link has been updated
        /// </summary>
        /// <param name="properties">
        /// A Microsoft.SharePoint.SPListEventProperties object that represents properties of the event handler.
        /// </param>
        //public override void FieldUpdated(SPListEventProperties properties)
        //{
        //}

        /// <summary>
        /// Occurs when a fieldlink is being updated
        /// </summary>
        /// <param name="properties">
        /// A Microsoft.SharePoint.SPListEventProperties object that represents properties of the event handler.
        /// </param>
        //public override void FieldUpdating(SPListEventProperties properties)
        //{
        //}
    }
}
